<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			 function showHost(){
				 alert(window.location.href);
				 window.location.href="https://www.baidu.com";
			 }
			 function doShuaxin(){
				 window.location.reload();
			 }
			 function tihuan(){
				 window.location.replace("https://www.oschina.net");
			 }
		</script>
	</head>
	<body>
		<a href="js-window.html">去js -window</a>
		<a href="document.html">去js -document窗口</a>
		
		<a href="javascript:void(0)" onclick="showHost()">当前host</a>
		<button onclick="doShuaxin()">刷新</button>
		
		<button onclick="tihuan()">替换</button>
	</body>
</html>